﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AChance.Dal.Entity;
using AChance.Func;

namespace AChance.Dal.Func
{
    public static class DalState
    {
        public static class Base
        {
            static Base()
            {
                Add(ORGSTATUS.ZC, "正常", 1);
                Add(ORGSTATUS.JY, "禁用", 2);

                Infos = Infos.OrderBy(sDD => sDD.SDDNAME).ThenBy(sDD => sDD.SDDORDER).ToList();
            }
            public static List<FDWSDD> Infos { get; private set; } = new List<FDWSDD>();
            private static void Add(Enum value, string dispName, int order)
            {
                Infos.Add(new FDWSDD
                {
                    SDDNAME = value.GetTypeName(),
                    SDDVALUE = value.GetValue(),
                    SDDDESC = dispName,
                    SDDORDER = order
                });
            }
        }

        public enum ORGSTATUS
        {
            /// <summary>
            /// 正常
            /// </summary>
            ZC = 1,
            /// <summary>
            /// 禁用
            /// </summary>
            JY = 2
        }


    }
}
